package org.example.domain.strategy.repository;

import org.example.domain.strategy.model.entity.StrategyAwardEntity;
import org.example.domain.strategy.model.entity.StrategyEntity;
import org.example.domain.strategy.model.entity.StrategyRuleEntity;
import org.example.domain.strategy.model.valobj.StrategyAwardRuleModelVO;

import java.util.List;
import java.util.Map;

/**
 * @Author: SrmaticHai6532
 * @Create:
 * @Description: 策略服务仓储接口
 */
public interface IStrategyRepository {
    // 查询策略奖励列表
    List<StrategyAwardEntity> queryStrategyAwardList(Long strategyId);

    // 存储策略奖励搜索率表
    void storeStrategyAwardSearchRateTable(String key, Integer rateRange, Map<Integer, Integer> strategyAwardSearchRateTable);

    // 获取策略奖励组装
    Integer getStrategyAwardAssemble(String key, Integer rateKey);

    // 获取奖励率范围
    int getRateRange(String key);

    // 根据策略ID获取费率范围
    int getRateRange(Long strategyId);

    // 根据策略ID查询策略实体
    StrategyEntity queryStrategyEntityByStrategyId(Long strategyId);

    // 根据策略ID和规则模型查询策略规则实体
    StrategyRuleEntity queryStrategyRule(Long strategyId, String ruleModel);

    // 根据策略ID、奖励ID和规则模型获取策略规则值
    String queryStrategyRuleValue(Long strategyId, Integer awardId, String ruleModel);

    StrategyAwardRuleModelVO queryStrategyAwardRuleModelVO(Long strategyId, Integer awardId);
}
